#ifndef __COMMON_DEF_H__
#define __COMMON_DEF_H__

//////////////////////////////////////////
#define FILE_TYPE_COUNT		2
#define FILE_TYPE_ZIP		0x00000001
#define FILE_TYPE_7Z		0x00000002

#define STR_ZIP				_T("zip")
#define STR_7Z				_T("7z")
#define STR_COMMA			_T(",")
#define STR_BACKSPLASH		_T("/")

#define APP_NAME_FTP		_T("ftp")
#define APP_NAME_DOWNLOAD	_T("download")



#define MAX_USER_PWD		100
#define READ_BUFFER_SIZE	4096
//////////////////////////////////////////
typedef struct  
{
	TCHAR		szServer[MAX_PATH];
	TCHAR		szUser[MAX_USER_PWD];
	TCHAR		szPwd[MAX_USER_PWD];
	TCHAR		szDefaultPath[MAX_PATH];
}FTPDATA, * LPFTPDATA;

typedef struct
{
	TCHAR		szRemotePath[MAX_PATH];
	TCHAR		szLocolPath[MAX_PATH];
	DWORD		dwFileType;
	SYSTEMTIME	tTimeRestrict;
}DOWNLOADDATA, * LPDOWNLOADDATA;

typedef struct
{
    HANDLE hRead;               /* stdout */
    HANDLE hWrite;              /* stdin */
    HANDLE hError;              /* stderr */
	
    HANDLE hReadU;            
    HANDLE hWriteU;            
    HANDLE hErrorU;            
	
    HANDLE hProcess;            /* child process handle */
    HANDLE hThread;             /* child main thread handle */
}CPWP_STRUCT;

#endif